/*
 * KitchenRepository.java
 * Copyright (c) 2014, 2019, Kiri. 
 * All rights reserved.
 */
package com.onesalt.service;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.onesalt.domain.Kitchen;

/**
 * 厨房
 *
 * @author kiri
 * @date 2015年4月6日
 * @version 1.0
 */
public interface KitchenRepository extends PagingAndSortingRepository<Kitchen, Long>, JpaSpecificationExecutor<Kitchen> {

	@Query("select c.city from t_kitchen c group by c.city")
	public List<String> findAllCities();
	
	public Kitchen findTopByCookId(long cookId);
}
